package com.project.managementpaltform.service;

import java.util.List;

import com.project.managementpaltform.entity.Equipment;
import com.project.managementpaltform.mapper.EquipmentMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class EquipmentService {

    @Autowired 
    EquipmentMapper equipmentMapper;

    public List<Equipment>  findWholeEquipment(){
         List<Equipment> result =this.equipmentMapper.findWholeEquipment();   
         return result; 
    }

    public Equipment queryVerificationExcel(String id){
        Equipment result = this.equipmentMapper.queryVerificationExcel(id);
        return result;
    }

    public Equipment queryStatesByEquipmentNumber(String EquipmentNumber){
        Equipment result = this.equipmentMapper.queryStatesByEquipmentNumber(EquipmentNumber);
        return result;
    }

    public Equipment queryEquipmentNumberByEquipmentName(String EquipmentName){
        Equipment result =  this.equipmentMapper.queryEquipmentNumberByEquipmentName(EquipmentName);
        return result;
    }

    public void updateProjectByEquipment(Equipment equipment){
        this.equipmentMapper.updateProjectByEquipment(equipment);
    }

    public void insertRecord(String EquipmentNumber,String EquipmentName, String VerificationRecord) {
        this.equipmentMapper.insertRecord(EquipmentNumber,EquipmentName,VerificationRecord);
    }
    
    

 }
